

import { http } from '@/tool/utils'

import { iPb } from '@/protobuf/interface/index'

export function Login(formData: iPb.Admin.ILoginRequest):Promise<iPb.Admin.ILoginResponse> {
    return http.post("Login",iPb.Admin.LoginRequest.create(formData))
}

export function Logout(formData: iPb.Admin.LogoutRequest):Promise<iPb.Admin.ILogoutResponse> {
    return http.post("Logout",iPb.Admin.LogoutRequest.create(formData))
}

export function ListAdminMenu(formData: iPb.Admin.IListAdminMenuRequest):Promise<iPb.Admin.IListAdminMenuResponse> {
    return http.post("ListAdminMenu",iPb.Admin.ListAdminMenuRequest.toObject(iPb.Admin.ListAdminMenuRequest.create(formData)))
}

export function Userinfo():Promise<iPb.Admin.IUserinfoResponse> {
    return http.post("Userinfo")
}